function isInteger(val) {
    return (val == parseInt(val));
}

function isNumber(val) {
    return !isNaN(val);
}